cd "/Users/dlk265/Library/CloudStorage/Box-Box/Executive Politics Directed Study/Youngstown experiments/Stata data sets/"

* SI Table 1: Sample Demographics of first two Lucid surveys *
use "youngstown_12combined.dta", clear
sum black latino female gop3 dem3 if survey1 == 1
tab education if survey1 == 1
sum age if survey1 == 1, detail
tab ideology if survey1 == 1

sum black latino female gop3 dem3 if survey2 == 1
tab education if survey2 == 1
sum age if survey2 == 1, detail
tab ideology if survey2 == 1

* SI Table 2: Sample Demographics for two follow-up Lucid Surveys *
use "youngstown_34combined.dta", clear
sum black latino female gop3 dem3 if survey3 == 1
tab education if survey3 == 1
sum age if survey3 == 1, detail
tab ideology if survey3 == 1

sum black latino female gop3 dem3 if survey4 == 1
tab education if survey4 == 1
sum age if survey4 == 1, detail
tab ideology if survey4 == 1

* Code for the percentages and tests reported in SI Tables 3 and 4 are above *

* SI Table 5: Estimating Treatment Effects with Logit Models and Controls: Original Experiments *
use "youngstown_12combined.dta", clear

logit wall_support wall_treat_zone1 wall_treat_zone3 rule_of_law dem5 gop5 female age education white
test wall_treat_zone1=wall_treat_zone3
outreg2 using sitable5, word dec(2) label replace
logit biden_coin_support biden_coin_treat_zone1 biden_coin_treat_zone3 rule_of_law dem5 gop5 female age education white
test biden_coin_treat_zone1=biden_coin_treat_zone3
outreg2 using sitable5, word dec(2) label append
logit hyp_coin_support hyp_coin_treat_zone1 hyp_coin_treat_zone3 rule_of_law dem5 gop5 female age education white
test hyp_coin_treat_zone1=hyp_coin_treat_zone3
outreg2 using sitable5, word dec(2) label append
logit hyp_loan_support hyp_loan_treat_zone1 hyp_loan_treat_zone3 rule_of_law dem5 gop5 female age education white
test hyp_loan_treat_zone1=hyp_loan_treat_zone3
outreg2 using sitable5, word dec(2) label append
logit clinton_loan_support clinton_loan_treat_zone1 clinton_loan_treat_zone3 rule_of_law dem5 gop5 female age education white
test clinton_loan_treat_zone1=clinton_loan_treat_zone3
outreg2 using sitable5, word dec(2) label append
logit tribunals_support tribunals_treat_zone1 tribunals_treat_zone3 rule_of_law dem5 gop5 female age education white
test tribunals_treat_zone1=tribunals_treat_zone3
outreg2 using sitable5, word dec(2) label append

* SI Table 6: Estimating Treatment Effects with Logit Models and Controls: Follow-up Experiments *
use "youngstown_34combined.dta", clear

logit biden_studentloans_support biden_studentloans_treat_zone1 biden_studentloans_treat_zone3 rule_of_law dem5 gop5 female age education white
test biden_studentloans_treat_zone1=biden_studentloans_treat_zone3
outreg2 using sitable6, word dec(2) label replace

logit mexloan_support mexloan_treat_zone1 mexloan_treat_zone3 rule_of_law dem5 gop5 female age education white
test mexloan_treat_zone1=mexloan_treat_zone3
outreg2 using sitable6, word dec(2) label append

logit clintonloan_support clintonloan_treat_zone1 clintonloan_treat_zone3 rule_of_law dem5 gop5 female age education white
test clintonloan_treat_zone1=clintonloan_treat_zone3
outreg2 using sitable6, word dec(2) label append


* SI Table 7: Treatment X ROL Interaction, Original Experiments *
use "youngstown_12combined.dta", clear
logit wall_support i.wall_treat_zone1##c.rule_of_law dem5 gop5 female age education white if wall_treat_zone1 == 1|wall_treat_zone3 == 1
outreg2 using sitable7, word dec(2) label replace
logit biden_coin_support i.biden_coin_treat_zone1##c.rule_of_law dem5 gop5 female age education white if biden_coin_treat_zone1 == 1|biden_coin_treat_zone3 == 1
outreg2 using sitable7, word dec(2) label append
logit hyp_coin_support i.hyp_coin_treat_zone1##c.rule_of_law dem5 gop5 female age education white if hyp_coin_treat_zone1 == 1|hyp_coin_treat_zone3 == 1
outreg2 using sitable7, word dec(2) label append
logit hyp_loan_support i.hyp_loan_treat_zone1##c.rule_of_law dem5 gop5 female age education white if hyp_loan_treat_zone1 == 1|hyp_loan_treat_zone3 == 1
outreg2 using sitable7, word dec(2) label append
logit clinton_loan_support i.clinton_loan_treat_zone1##c.rule_of_law dem5 gop5 female age education white if clinton_loan_treat_zone1 == 1|clinton_loan_treat_zone3 == 1
outreg2 using sitable7, word dec(2) label append
logit tribunals_support i.tribunals_treat_zone1##c.rule_of_law dem5 gop5 female age education white if tribunals_treat_zone1 == 1|tribunals_treat_zone3 == 1
outreg2 using sitable7, word dec(2) label append

* SI Table 8: Effects by Party *
use  "youngstown_12combined.dta", clear
gen party3 = .
replace party3=1 if dem5==1
replace party3 = 2 if dem5 == 0 & gop5 == 0
replace party3 = 3 if gop5 == 1

gen wall_condition = .
replace wall_condition = 1 if wall_treat_zone1 == 0&wall_treat_zone3==0
replace wall_condition = 2 if wall_treat_zone1 == 1
replace wall_condition = 3 if wall_treat_zone3 == 1
logit wall_support i.wall_condition##i.party3 female age education white rule_of_law
outreg2 using sitable8, word dec(2) label replace

gen bidencoin_condition = .
replace bidencoin_condition = 1 if biden_coin_treat_zone1 == 0 & biden_coin_treat_zone3==0
replace bidencoin_condition = 2 if biden_coin_treat_zone1 == 1
replace bidencoin_condition = 3 if biden_coin_treat_zone3 == 1
logit biden_coin_support i.bidencoin_condition##i.party3 female age education white rule_of_law
outreg2 using sitable8, word dec(2) label append

gen hypcoin_condition = .
replace hypcoin_condition = 1 if hyp_coin_treat_zone1 == 0&hyp_coin_treat_zone3==0
replace hypcoin_condition = 2 if hyp_coin_treat_zone1 == 1
replace hypcoin_condition = 3 if hyp_coin_treat_zone3 == 1
logit hyp_coin_support i.hypcoin_condition##i.party3 female age education white rule_of_law
outreg2 using sitable8, word dec(2) label append

gen hyp_loan_condition = .
replace hyp_loan_condition = 1 if hyp_loan_treat_zone1 == 0 & hyp_loan_treat_zone3==0
replace hyp_loan_condition = 2 if hyp_loan_treat_zone1 == 1
replace hyp_loan_condition = 3 if hyp_loan_treat_zone3 == 1
logit hyp_loan_support i.hyp_loan_condition##i.party3 female age education white rule_of_law 
outreg2 using sitable8, word dec(2) label append

gen clinton_loan_condition = .
replace clinton_loan_condition = 1 if clinton_loan_treat_zone1 == 0 & clinton_loan_treat_zone3==0
replace clinton_loan_condition = 2 if clinton_loan_treat_zone1 == 1
replace clinton_loan_condition = 3 if clinton_loan_treat_zone3 == 1
logit clinton_loan_support i.clinton_loan_condition##i.party3 female age education white rule_of_law if clinton == 1
outreg2 using sitable8, word dec(2) label append

gen bushtribunals_condition = .
replace bushtribunals_condition = 1 if tribunals_treat_zone1 == 0 & tribunals_treat_zone3==0
replace bushtribunals_condition = 2 if tribunals_treat_zone1 == 1
replace bushtribunals_condition = 3 if tribunals_treat_zone3 == 1
logit tribunals_support i.bushtribunals_condition##i.party3 female age education white rule_of_law
outreg2 using sitable8, word dec(2) label append

* SI Table 9: Treatment X ROL Interaction, Follow-up Experiments *
use "youngstown_34combined.dta", clear
logit biden_studentloans_support i.biden_studentloans_treat_zone1##c.rule_of_law dem5 gop5 female age education white if biden_studentloans_treat_zone1 == 1|biden_studentloans_treat_zone3 == 1
outreg2 using sitable9, word dec(2) label replace
logit mexloan_support i.mexloan_treat_zone1##c.rule_of_law dem5 gop5 female age education white if mexloan_treat_zone1 == 1|mexloan_treat_zone3 == 1
outreg2 using sitable9, word dec(2) label append
logit clintonloan_support i.clintonloan_treat_zone1##c.rule_of_law dem5 gop5 female age education white if clintonloan_treat_zone1 == 1|clintonloan_treat_zone3 == 1
outreg2 using sitable9, word dec(2) label append

* SI Table 10: Treatment Effects by Party, Follow-up Experiments *
use  "youngstown_34combined.dta", clear
gen party3 = .
replace party3=1 if dem5==1
replace party3 = 2 if dem5 == 0 & gop5 == 0
replace party3 = 3 if gop5 == 1

gen biden_studentloans_condition = .
replace biden_studentloans_condition = 1 if biden_studentloans_treat_leg == 1
replace biden_studentloans_condition = 2 if biden_studentloans_treat_zone1 == 1
replace biden_studentloans_condition = 3 if biden_studentloans_treat_zone3 == 1
logit biden_studentloans_support i.biden_studentloans_condition##i.party3 female age education white rule_of_law
outreg2 using sitable10, word dec(2) label replace

gen mexloan_condition = .
replace mexloan_condition = 1 if mexloan_treat_legislation == 1
replace mexloan_condition = 2 if mexloan_treat_zone1 == 1
replace mexloan_condition = 3 if mexloan_treat_zone3 == 1
logit mexloan_support i.mexloan_condition##i.party3 female age education white rule_of_law
outreg2 using sitable10, word dec(2) label append

gen clintonloan_condition = .
replace clintonloan_condition = 1 if clintonloan_treat_legislation == 1
replace clintonloan_condition = 2 if clintonloan_treat_zone1 == 1
replace clintonloan_condition = 3 if clintonloan_treat_zone3 == 1
logit clintonloan_support i.clintonloan_condition##i.party3 female age education white rule_of_law
outreg2 using sitable10, word dec(2) label append


* SI Figure 1 -- Treatment Effects across All Six Experiments Using Four-point DV *
* First use combined survey data set -- it just has the data for all six experiments as variables -- nothing else ** SI Figure 1 *
use "youngstown_12combined.dta", clear

gen n = _n
gen diff = .
gen l = .
gen u = .
gen sediff = .
gen treatment = .

reg hyp_coin hyp_coin_treat_zone1 hyp_coin_treat_zone3
test hyp_coin_treat_zone1 = hyp_coin_treat_zone3
replace diff = _b[hyp_coin_treat_zone1] if n == 11
replace sediff = _se[hyp_coin_treat_zone1] if n == 11
replace treatment = 1 if n == 11
replace diff = _b[hyp_coin_treat_zone3] if n == 10
replace sediff = _se[hyp_coin_treat_zone3] if n == 10
replace treatment = 0 if n == 10

reg biden_coin biden_coin_treat_zone1 biden_coin_treat_zone3
test biden_coin_treat_zone1 = biden_coin_treat_zone3
replace diff = _b[biden_coin_treat_zone1] if n == 14
replace sediff = _se[biden_coin_treat_zone1] if n == 14
replace treatment = 1 if n == 14
replace diff = _b[biden_coin_treat_zone3] if n == 13
replace sediff = _se[biden_coin_treat_zone3] if n == 13
replace treatment = 0 if n == 13

reg hyp_loan hyp_loan_treat_zone1 hyp_loan_treat_zone3
test hyp_loan_treat_zone1 = hyp_loan_treat_zone3
replace diff = _b[hyp_loan_treat_zone1] if n == 8
replace sediff = _se[hyp_loan_treat_zone1] if n == 8
replace treatment = 1 if n == 8
replace diff = _b[hyp_loan_treat_zone3] if n == 7
replace sediff = _se[hyp_loan_treat_zone3] if n == 7
replace treatment = 0 if n == 7

reg clinton_loan clinton_loan_treat_zone1 clinton_loan_treat_zone3
test clinton_loan_treat_zone1 = clinton_loan_treat_zone3
replace diff = _b[clinton_loan_treat_zone1] if n == 5
replace sediff = _se[clinton_loan_treat_zone1] if n == 5
replace treatment = 1 if n == 5
replace diff = _b[clinton_loan_treat_zone3] if n == 4
replace sediff = _se[clinton_loan_treat_zone3] if n == 4
replace treatment = 0 if n == 4

reg tribunals tribunals_treat_zone1 tribunals_treat_zone3
test tribunals_treat_zone1=tribunals_treat_zone3
replace diff = _b[tribunals_treat_zone1] if n == 2
replace sediff = _se[tribunals_treat_zone1] if n == 2
replace treatment = 1 if n == 2
replace diff = _b[tribunals_treat_zone3] if n == 1
replace sediff = _se[tribunals_treat_zone3] if n == 1
replace treatment = 0 if n == 1

reg wall wall_treat_zone1 wall_treat_zone3
test wall_treat_zone1=wall_treat_zone3
replace diff = _b[wall_treat_zone1] if n == 17
replace sediff = _se[wall_treat_zone1] if n == 17
replace treatment = 1 if n == 17
replace diff = _b[wall_treat_zone3] if n == 16
replace sediff = _se[wall_treat_zone3] if n == 16
replace treatment = 0 if n == 16

replace l = diff-1.96*(sediff)
replace u = diff+1.96*(sediff)
replace n = . if n > 17

twoway (dot  diff n if treatment == 1, horizontal ndots(0) dcolor(white) symbol(triangle) color(black)) ///
(dot  diff n if treatment == 0, horizontal ndots(0) dcolor(white) symbol(square) color(black)) ///
(rspike u l n, horizontal color(black)), yti("") graphregion(color(white)) ///
xline(0) xlabel(-.3 -.2 -.1 0 .1 .2 .3 .4) xline(0) ///
ylabel(10.5 "Hypothetical coin" 13.5 "Biden coin" 7.5 "Hypothetical loan" 4.5 "Clinton loan" 1.5 "Bush tribunals" 16.5 "Trump wall", angle(0)) /// 
legend(order( 1 "Zone 1 treatment" 2 "Zone 3 treatment") size(medsmall) keygap(0) cols(2)) scale(.75) 

* SI Figure 2: Follow-Up Experiment Treatment Effects Using 4-Point DV *
use  "youngstown_34combined.dta", clear

gen n = _n
gen diff = .
gen l = .
gen u = .
gen sediff = .
gen treatment = .

reg mexloan mexloan_treat_zone1  mexloan_treat_zone3
test mexloan_treat_zone1 = mexloan_treat_zone3
replace diff = _b[mexloan_treat_zone1] if n == 5
replace sediff = _se[mexloan_treat_zone1] if n == 5
replace treatment = 1 if n == 5
replace diff = _b[mexloan_treat_zone3] if n == 4
replace sediff = _se[mexloan_treat_zone3] if n == 4
replace treatment = 0 if n == 4

reg clintonloan clintonloan_treat_zone1 clintonloan_treat_zone3
test clintonloan_treat_zone1 = clintonloan_treat_zone3
replace diff = _b[clintonloan_treat_zone1] if n == 2
replace sediff = _se[clintonloan_treat_zone1] if n == 2
replace treatment = 1 if n == 2
replace diff = _b[clintonloan_treat_zone3] if n == 1
replace sediff = _se[clintonloan_treat_zone3] if n == 1
replace treatment = 0 if n == 1

reg biden_studentloans biden_studentloans_treat_zone1 biden_studentloans_treat_zone3
test biden_studentloans_treat_zone1 = biden_studentloans_treat_zone3
replace diff = _b[biden_studentloans_treat_zone1] if n == 8
replace sediff = _se[biden_studentloans_treat_zone1] if n == 8
replace treatment = 1 if n == 8
replace diff = _b[biden_studentloans_treat_zone3] if n == 7
replace sediff = _se[biden_studentloans_treat_zone3] if n == 7
replace treatment = 0 if n == 7

replace l = diff-1.96*(sediff)
replace u = diff+1.96*(sediff)
replace n = . if n > 11

twoway (dot  diff n if treatment == 1 & n < 9, horizontal ndots(0) dcolor(white) symbol(triangle) color(black)) ///
(dot  diff n if treatment == 0 & n < 9, horizontal ndots(0) dcolor(white) symbol(square) color(black)) ///
(rspike u l n if n < 9, horizontal color(black)), yti("") graphregion(color(white)) ///
xline(0) xlabel(-.4 -.3 -.2 -.1 0 .1 .2 .3) xline(0) ///
ylabel(1.5 "Clinton Mexico loan" 4.5 "Hypothetical Mexico loan" 7.5 "Biden student loan debt", angle(0)) /// 
legend(order( 1 "Unilateral: Zone 1 Treatment" 2 "Unilatral: Zone 3 Treatment") size(small) keygap(0) cols(2)) scale(.75) yscale(range(.5 5.5)) xti(" " "Difference vs. Legislation Baseline")

* SI Figure 3: Replicating Analyses in Figure 4 and 6 for Additional Hypothetical Coin Experiment *
use  "youngstown_34combined.dta", clear

gen n = _n
gen diff = .
gen l = .
gen u = .
gen sediff = .
gen treatment = .

reg studentloans_support studentloans_treat_zone1 studentloans_treat_zone3
test studentloans_treat_zone1 = studentloans_treat_zone3
replace diff = _b[studentloans_treat_zone1] if n == 2
replace sediff = _se[studentloans_treat_zone1] if n == 2
replace treatment = 1 if n == 2
replace diff = _b[studentloans_treat_zone3] if n == 1
replace sediff = _se[studentloans_treat_zone3] if n == 1
replace treatment = 0 if n == 1

replace l = diff-1.96*(sediff)
replace u = diff+1.96*(sediff)
replace n = . if n > 2

twoway (dot  diff n if treatment == 1, horizontal ndots(0) dcolor(white) symbol(triangle) color(black)) ///
(dot  diff n if treatment == 0, horizontal ndots(0) dcolor(white) symbol(square) color(black)) ///
(rspike u l n, horizontal color(black)), yti("") graphregion(color(white)) ///
xline(0) xlabel(-.2 "-20%" -.1 "-10%" 0 "0%" .1 "10%" .2 "20%") xline(0) ///
ylabel(1.5 "Hypothetical student loan debt" , angle(0)) /// 
legend(order( 1 "Unilateral: Zone 1 Treatment" 2 "Unilateral: Zone 3 Treatment") size(small) keygap(0) cols(2)) scale(.75) yscale(range(.5 2.5)) xti(" " "Difference vs. Legislation Baseline") saving(SIfig3a.gph, replace)
* Hypothetical Student Loans *
use  "youngstown_34combined.dta", clear
gen party3 = .
replace party3=1 if dem5==1
replace party3 = 2 if dem5 == 0 & gop5 == 0
replace party3 = 3 if gop5 == 1

gen studentloans_condition = .
replace studentloans_condition = 1 if studentloans_treat_legislation == 1
replace studentloans_condition = 2 if studentloans_treat_zone1 == 1
replace studentloans_condition = 3 if studentloans_treat_zone3 == 1

logit studentloans_support i.studentloans_condition##i.party3 female age education white rule_of_law
margins, at(party3=(1 (1) 3) studentloans_condition=(1(1)3) rule_of_law = 2.8 female=1 age=44 white=1 education=3)  post
margins, coeflegend
* Test Democrats delegation vs. contra Congress *
test _b[4._at] = _b[7._at]
* Test Independents delegation vs. contra Congress *
test _b[5._at] = _b[8._at]
* Test Republicans delegation vs. contra Congress *
test _b[6._at] = _b[9._at]

logit studentloans_support i.studentloans_condition##i.party3 female age education white rule_of_law
margins, at(party3=(1 (1) 3) studentloans_condition=(1(1)3) rule_of_law = 2.8 female=1 age=44 white=1 education=3)
matrix results = r(table)
matrix list results

gen n = _n
gen point = .
gen l = .
gen u = .
gen party = .
gen treatment = .

local a = results[1,1]
replace point = results[1,4] if n == 8
replace l = results[5,4] if n == 8
replace u = results[6,4] if n == 8
replace treatment = 1 if n == 8

replace point = results[1,7] if n == 7
replace l = results[5,7] if n == 7
replace u = results[6,7] if n == 7
replace treatment = 2 if n == 7

local b = results[1,2]
replace point = results[1,5] if n == 5
replace l = results[5,5] if n == 5
replace u = results[6,5] if n == 5
replace treatment = 1 if n == 5

replace point = results[1,8] if n == 4
replace l = results[5,8] if n == 4
replace u = results[6,8] if n == 4
replace treatment = 2 if n == 4

local c = results[1,3]
replace point = results[1,6] if n == 2
replace l = results[5,6] if n == 2
replace u = results[6,6] if n == 2
replace treatment = 1 if n == 2

replace point = results[1,9] if n == 1
replace l = results[5,9] if n == 1
replace u = results[6,9] if n == 1
replace treatment = 2 if n == 1

drop if n > 8

twoway (dot  point n if treatment == 1, horizontal ndots(0) dcolor(white) symbol(triangle) color(black)) ///
(dot  point n if treatment == 2, horizontal ndots(0) dcolor(white) symbol(square) color(black)) ///
(dot  point n if treatment == 3, horizontal ndots(0) dcolor(white) symbol(triangle) color(black)) ///
(rspike u l n, horizontal color(black)), yti("") graphregion(color(white)) ///
xline(`a', lcolor(blue)) xline(`b', lpattern(dash) lcolor(black)) xline(`c', lpattern(shortdash)) xlabel(.1 .2 .3 .4 .5 .6 .7 .8 .9)  ///
ylabel(7.5 "Democrats" 4.5 "Independents" 1.5 "Republicans", angle(0)) /// 
legend(order( 1 "Unilateral: Delegated authority" 2 "Unilateral: Contra Congress")  size(vsmall) keygap(0) cols(2)) scale(.75) yscale(range(.5 8.5)) ti("Hypothetical student loans") saving(sifig3b.gph, replace)

graph combine "sifig3a.gph" "sifig3b", graphregion(color(white)) rows(2) xsize(8.5) ysize(11)

* SI Figure 4: Treatment Effects, Partisanship and the Rule of Law: Original Experiments *
use  "youngstown_12combined.dta", clear

logit hyp_coin_support female age education white c.rule_of_law  gop5 dem5 i.hyp_coin_treat_zone3 i.hyp_coin_treat_zone1
margins, dydx (hyp_coin_treat_zone1 hyp_coin_treat_zone3 rule_of_law gop5 dem5)  at(hyp_coin_treat_zone1=0 hyp_coin_treat_zone3=0 gop5=0 dem5=0)
marginsplot, horizontal recast(scatter) recastci(rspike) xline(0) xscale(range(-.25 .5)) yscale(range(.75 5.25)) xlabel( -.2 -.1 0 .1 .2 .3 .4 .5) ylabel(1 "Rule of Law" 2 "Republican" 3 "Democrat" 4 "Zone 3 treatment" 5 "Zone 1 treatment") ///
yti("") xti("Change in support") ti("Hypothetical coin") graphregion(color(white)) scale(.75) saving(hyp_coin.gph, replace)

logit clinton_loan_support female age education white c.rule_of_law  gop5 dem5 i.clinton_loan_treat_zone3 i.clinton_loan_treat_zone1
margins, dydx (clinton_loan_treat_zone1 clinton_loan_treat_zone3 rule_of_law gop5 dem5)  at(clinton_loan_treat_zone1=0 clinton_loan_treat_zone3=0 gop5=0 dem5=0)
marginsplot, horizontal recast(scatter) recastci(rspike) xline(0) xscale(range(-.25 .5)) yscale(range(.75 5.25)) xlabel( -.2 -.1 0 .1 .2 .3 .4 .5) ylabel(1 "Rule of Law" 2 "Republican" 3 "Democrat" 4 "Zone 3 treatment" 5 "Zone 1 treatment") ///
yti("") xti("Change in support") ti("Clinton loan") graphregion(color(white))  scale(.75) saving(clinton_loan.gph, replace)

logit tribunals_support female age education white c.rule_of_law  gop5 dem5 i.tribunals_treat_zone3 i.tribunals_treat_zone1
margins, dydx (tribunals_treat_zone1 tribunals_treat_zone3 rule_of_law gop5 dem5) at(tribunals_treat_zone1=0 tribunals_treat_zone3=0 gop5=0 dem5=0)
marginsplot, horizontal recast(scatter) recastci(rspike) xline(0)  xlabel( -.2 -.1 0 .1 .2 .3 .4 .5) xscale(range(-.25 .5)) yscale(range(.75 5.25)) ylabel(1 "Rule of Law" 2 "Republican" 3 "Democrat" 4 "Zone 3 treatment" 5 "Zone 1 treatment") ///
yti("") xti("Change in support") ti("Military tribunals") graphregion(color(white))  scale(.75) saving(tribunals.gph, replace)

logit biden_coin_support female age education white c.rule_of_law  gop5 dem5 i.biden_coin_treat_zone3 i.biden_coin_treat_zone1
margins, dydx (biden_coin_treat_zone1 biden_coin_treat_zone3 rule_of_law gop5 dem5)  at(biden_coin_treat_zone1=0 biden_coin_treat_zone3=0 gop5=0 dem5=0)
marginsplot, horizontal recast(scatter) recastci(rspike) xline(0) xlabel( -.2 -.1 0 .1 .2 .3 .4 .5) xscale(range(-.25 .5)) yscale(range(.75 5.25)) ylabel(1 "Rule of Law" 2 "Republican" 3 "Democrat" 4 "Zone 3 treatment" 5 "Zone 1 treatment") ///
yti("") xti("Change in support") ti("Biden coin") graphregion(color(white)) scale(.75) saving(biden_coin.gph, replace)

logit hyp_loan_support female age education white c.rule_of_law  gop5 dem5 i.hyp_loan_treat_zone3 i.hyp_loan_treat_zone1
margins, dydx (hyp_loan_treat_zone1 hyp_loan_treat_zone3 rule_of_law gop5 dem5)  at(hyp_loan_treat_zone1=0 hyp_loan_treat_zone3=0 gop5=0 dem5=0)
marginsplot, horizontal recast(scatter) recastci(rspike) xline(0) xlabel( -.2 -.1 0 .1 .2 .3 .4 .5) xscale(range(-.25 .5)) yscale(range(.75 5.25)) ylabel(1 "Rule of Law" 2 "Republican" 3 "Democrat" 4 "Zone 3 treatment" 5 "Zone 1 treatment") ///
yti("") xti("Change in support") ti("Hypothetical loan") graphregion(color(white)) scale(.75) saving(hyp_loan.gph, replace)

logit wall_support female age education white c.rule_of_law  gop5 dem5 i.wall_treat_zone3 i.wall_treat_zone1
margins, dydx (wall_treat_zone1 wall_treat_zone3 rule_of_law gop5 dem5)  at(wall_treat_zone1=0 wall_treat_zone3=0 gop5=0 dem5=0)
marginsplot, horizontal recast(scatter) recastci(rspike) xline(0) xlabel(-.2 -.1 0 .1 .2 .3 .4 .5) xscale(range(-.25 .5)) yscale(range(.75 5.25)) ylabel(1 "Rule of Law" 2 "Republican" 3 "Democrat" 4 "Zone 3 treatment" 5 "Zone 1 treatment") ///
yti("") xti("Change in support") ti("Trump wall") graphregion(color(white)) scale(.75) saving(wall.gph, replace)

graph combine hyp_coin.gph biden_coin.gph  hyp_loan.gph clinton_loan.gph tribunals.gph wall.gph, cols(2) rows(3) graphregion(color(white))

* SI Figure 5: Treatment Effects, Partisanship and the Rule of Law: Original Experiments *
use  "youngstown_34combined.dta", clear

logit biden_studentloans_support female age education white c.rule_of_law  gop5 dem5 i.biden_studentloans_treat_zone3 i.biden_studentloans_treat_zone1
margins, dydx (biden_studentloans_treat_zone1 biden_studentloans_treat_zone3 rule_of_law gop5 dem5)  at(biden_studentloans_treat_zone1=0 biden_studentloans_treat_zone3=0 gop5=0 dem5=0)
marginsplot, horizontal recast(scatter) recastci(rspike) xline(0) xlabel( -.2 -.1 0 .1 .2 .3 .4 .5) xscale(range(-.25 .5)) yscale(range(.75 5.25)) ylabel(1 "Rule of Law" 2 "Republican" 3 "Democrat" 4 "Zone 3 treatment" 5 "Zone 1 treatment") ///
yti("") xti("Change in support") ti("Biden student loan debt") graphregion(color(white)) scale(.75) saving(biden_studentloans.gph, replace)

logit mexloan_support female age education white c.rule_of_law  gop5 dem5 i.mexloan_treat_zone3 i.mexloan_treat_zone1
margins, dydx (mexloan_treat_zone1 mexloan_treat_zone3 rule_of_law gop5 dem5)  at(mexloan_treat_zone1=0 mexloan_treat_zone3=0 gop5=0 dem5=0)
marginsplot, horizontal recast(scatter) recastci(rspike) xline(0) xlabel( -.2 -.1 0 .1 .2 .3 .4 .5) xscale(range(-.25 .5)) yscale(range(.75 5.25)) ylabel(1 "Rule of Law" 2 "Republican" 3 "Democrat" 4 "Zone 3 treatment" 5 "Zone 1 treatment") ///
yti("") xti("Change in support") ti("Hypothetical Mexico loan") graphregion(color(white)) scale(.75) saving(mexloan.gph, replace)

logit clintonloan_support female age education white c.rule_of_law  gop5 dem5 i.clintonloan_treat_zone3 i.clintonloan_treat_zone1
margins, dydx (clintonloan_treat_zone1 clintonloan_treat_zone3 rule_of_law gop5 dem5)  at(clintonloan_treat_zone1=0 clintonloan_treat_zone3=0 gop5=0 dem5=0)
marginsplot, horizontal recast(scatter) recastci(rspike) xline(0) xlabel( -.2 -.1 0 .1 .2 .3 .4 .5) xscale(range(-.25 .5)) yscale(range(.75 5.25)) ylabel(1 "Rule of Law" 2 "Republican" 3 "Democrat" 4 "Zone 3 treatment" 5 "Zone 1 treatment") ///
yti("") xti("Change in support") ti("Clinton Mexico loan") graphregion(color(white)) scale(.75) saving(clintonloan.gph, replace)

graph combine biden_studentloans.gph  mexloan.gph clintonloan.gph , cols(1) rows(3) graphregion(color(white)) xsize(8.5) ysize(11)





